package com.clinic.api.drug;

import com.clinic.framework.common.request.DrugQueryRequest;
import com.clinic.framework.common.response.QueryList;
import com.clinic.framework.common.response.ResponseResult;
import com.clinic.framework.common.response.ResponseValue;
import com.clinic.framework.domain.base.Drug;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(value = "药品管理",description = "药品管理接口")
public interface DrugControllerApi {
    @ApiOperation("增加药品")
    @PostMapping("/add")
    public ResponseResult addDrug(@RequestBody Drug Drug);
    @ApiOperation("修改药品")
    @PostMapping("/edit")
    public ResponseResult editDrug(@RequestBody Drug Drug);
    @ApiOperation("根据id删除药品")
    @DeleteMapping("/get/{id}")
    public ResponseResult delDrug(String id);
    @ApiOperation("药品列表")
    @GetMapping("/list/{page}/{size}")
    public QueryList<Drug> findDrugList(@PathVariable("page") String page, @PathVariable("size") String size, DrugQueryRequest dqr);
    @ApiOperation("根据id查询药品")
    @GetMapping("/get/{id}")
    public ResponseValue<Drug> findDrugById(@PathVariable("id") String id);
}
